/*
 * @Author: Haochen
 * @Date: 2021-12-07 15:49:55
 * @LastEditTime: 2021-12-11 09:44:47
 * @FilePath: \students-system\src\store\index.js
 */
import Vue from 'vue';
import Vuex from 'vuex';
import classes from './modules/classes';
import subjects from './modules/subjects';
import students from './modules/students';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    num: 0,
  },
  mutations: {
    INCREMENT(state) {
      state.num++;
    },
    DECREMENT(state) {
      state.num--;
    },
    INPUTCOUNT(state, payload) {
      state.num = payload;
    },
  },

  modules: {
    classes,
    subjects,
    students,
  },
});
